package com.culture.config.core;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.config.environment.Environment;
import org.springframework.cloud.config.server.EnableConfigServer;
import org.springframework.cloud.config.server.environment.EnvironmentRepository;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

import com.culture.config.service.ConfigService;

@Configuration
@Profile("InnerEnvironment")
@EnableConfigServer
public class ConfigEnvironmentRepository implements EnvironmentRepository {
	@Autowired
	private ConfigService configService;
	
	@Override
	public Environment findOne(String application, String profile, String label) {		
		return this.configService.findOne(application, profile, label);
	}

}
